<?php
	// If Process type is PREVIEW/EDIT/DELETE, Get All variables needed to be displayed by form, Edit SQL & Variable if necessary !!!
	if($process_type == "PREVIEW" || $process_type == "EDIT" || $process_type == "DELETE")
	{
		$sql2 = "select * from ms_user_group where stsrc = 'A' and usergroupid = '".$PK_id."' ";
		$exe2 = mysql_query($sql2) or die(mysql_error());
		$num2 = mysql_num_rows($exe2);
		$row2 = mysql_fetch_array($exe2);
		
		// Set Value if data is found
		if($num2>0)
		{
			$val_user_group_PK_id = $row2['usergroupid'];
			$val_user_group_name = $row2['usergroupname'];
			$val_user_group_activate = $row2['usergroupstatus'];
		}
		else
		{
			$val_user_group_PK_id = "";
			$val_user_group_name = "";
			$val_user_group_activate = "";
		}
	}
	else
	{
		$val_user_group_PK_id = "";
		$val_user_group_name = "";
		$val_user_group_activate = "";
	}
	
?>
<!-- Start Row Data -->
<div class="divFormRowData">
	<div style="float:left; text-align:right; width:<?php echo $rowDivWidth; ?>px;">Name</div>
	<div style="float:left;">&nbsp;:&nbsp;</div>
	<div style="float:left;">
		<input type="hidden" type="text" name="txt_usergroup_name" value="<?php echo $val_user_group_name; ?>" />
		<input <?php if($_SESSION['usergroupid'] != 1 || $process_type == "PREVIEW" || $process_type == "DELETE"){echo "disabled='disabled'";} ?> type="text" required name="txt_usergroup_name" value="<?php echo $val_user_group_name; ?>" style="width:200px; height:18px;" />
	</div>
	<div style="clear:both;"></div>
</div>
<div class="divFormRowData">
	<div style="float:left; text-align:right; width:<?php echo $rowDivWidth; ?>px;">Activate</div>
	<div style="float:left;">&nbsp;:&nbsp;</div>
	<div style="float:left;">
		<input type="hidden" name="txt_usergroup_PK_id" value="<?php echo $val_user_group_PK_id; ?>" style="width:200px; height:18px;" />
		<input <?php if($process_type == "PREVIEW" || $process_type == "DELETE"){echo "disabled='disabled'";} ?> type="radio" name="rdo_usergroup_activate" value="1" <?php if(isset($val_user_group_activate)){if($val_user_group_activate == 1){echo "checked='true'";}} ?> /> Yes
		<input <?php if($process_type == "PREVIEW" || $process_type == "DELETE"){echo "disabled='disabled'";} ?> type="radio" name="rdo_usergroup_activate" value="0" <?php if(isset($val_user_group_activate)){if($val_user_group_activate == 0){echo "checked='true'";}} ?> /> No
	</div>
	<div style="clear:both;"></div>
</div>
<!-- End Row Data -->